﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Learn.Web.MVC.Code.StaticCache;
using System.Web.Security;
using System.Web.Configuration;

namespace Learn.Web.MVC.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {

        public ActionResult Index(string p1,string p3,string p2,string id)
        {
            ViewData["Message"] = "Welcome to ASP.NET MVC!";

            ViewData["User"] = new { Name = "Tom", Age = 14 };

            Index(Request.QueryString["p1"]);

            return View();
        }

        [NonAction]
        public void Index(string paraValue)
        {
            Response.Write("More Index Invoke " + paraValue);
        }

        [StaticCache]
        [OutputCache(CacheProfile = "About")]
        public ActionResult About()
        {
            return View();
        }
    }
}
